POV-Ray : Newsgroups : povray.newusers : Random : Random Server Time
5 Sep 2024 08:21:06 EDT (-0400)
  Random  
From: yooper
Date: 16 May 2001 16:47:07
Message: <3b02e74b$1@news.povray.org>
I give up !!!
I thought I had this fingered out but . . . ?
Maybe I've been staring at it for too long 'cause no matter
how I tweek it, it seems that 2 + 2 now equals 5. ;)

I want to use three random strings . . . one for each object
so that I can alter one without changing the other two.
Here's what I have:

#declare R0 = seed(3151);
#declare R1 = seed(137);
#declare R2 = seed(1911);

and then I loop though and call these a number of times.

#declare X0=X0+(rand(R0)-0.5)*D;
#declare Y0=Y0+(rand(R0)-0.5)*D;
#declare X1=X1+(rand(R1)-0.5)*D;
#declare Y1=Y1+(rand(R1)-0.5)*D;
#declare X2=X2+(rand(R2)-0.5)*D;
#declare Y2=Y2+(rand(R2)-0.5)*D;

Now . . . I like the shape of the one using R0 and want to
keep it but would like to change those generated using R1 & R2.
When I change the seed value for R1 and/or R2, I get NO CHANGE.
The only way I get different shapes is if I change R0 . . . then all 3
are altered.  I thought that the 3 streams would be independant of
one another but they are not.

And I wanna know,  "Whatz up wid that ???" 'cause I can't see it.
I've stared at it long enough to know that I'm stuck.
And yes, I tried the POVray docs . . . ZIp, Nothing on Rand anywhere
I have looked.  I've searched these messages for "Random" messages
but haven't found any that answer the Question. What am I doing wrong?

any help will be appreciated . . . it's most likely very simple but then,
so am I ;)

Y


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.